﻿namespace GeoSketch2.Core
{
    /// <summary>
    /// The rectification coefficients structure such as :
    ///  X = (a1 * x + a2 * y + a3) / (c1 * x + c2 * y + 1)
    ///  Y = (b1 * x + b2 * y + b3) / (c1 * x + c2 * y + 1)
    /// With :
    ///  X : X-coordinates of a point in the world coordinates system
    ///  Y : Y-coordinates of a point in the world coordinates system
    ///  x : x-coordinates of a point in the image coordinates system
    ///  y : y-coordinates of a point in the image coordinates system
    ///  a1, a2, a3, b1, b2, b3, c1, c2 : the rectification coefficients
    /// </summary>
    public class RectificationCoefficients
    {
        #region Fields
        /// <value name="a1">The a1 coefficient of the transformation</value>
        /// <value name="a2">The a2 coefficient of the transformation</value>
        /// <value name="a3">The a3 coefficient of the transformation</value>
        /// <value name="b1">The b1 coefficient of the transformation</value>
        /// <value name="b2">The b2 coefficient of the transformation</value>
        /// <value name="b3">The b3 coefficient of the transformation</value>
        /// <value name="c1">The c1 coefficient of the transformation</value>
        /// <value name="c2">The c2 coefficient of the transformation</value>
        public double
            a1,
            a2,
            a3,
            b1,
            b2,
            b3,
            c1,
            c2; 
        #endregion

        #region Constructor
        /// <summary>
        /// The rectification coefficients
        /// </summary>
        public RectificationCoefficients()
        {
            a1 = 0;
            a2 = 0;
            a3 = 0;
            b1 = 0;
            b2 = 0;
            b3 = 0;
            c1 = 0;
            c2 = 0;
        } 
        #endregion
    }
}
